how backend works